//https://www.nowcoder.com/practice/e7e0d226f1e84ba7ab8b28efc6e1aebc?tpId=46&tqId=38929&rp=1&ru=/ta/classic-code&qru=/ta/classic-code&difficulty=1&judgeStatus=&tags=/question-ranking
class UnusualAdd {
  public:
    int addAB(int A, int B) {
        // write code here

        while (B != 0) {
            int t = (unsigned int)(A & B) << 1; // 计算进位部分
            A ^= B; // 计算不进位部分
            B = t; // 重复上述步骤，直到进位部分为0
        }
        return A;
    }
};